#ifndef SOBJC_COMMONS_STR_STREAM_H
#define SOBJC_COMMONS_STR_STREAM_H

#include <sobjc-commons/port.h>
#include <stdarg.h>

typedef struct _objc_str_stream *objc_str_stream_t;

OBJC_EXPORT objc_str_stream_t objc_make_str_stream();
OBJC_EXPORT void objc_free_str_stream(objc_str_stream_t);

OBJC_EXPORT char *objc_str_stream_value(objc_str_stream_t);
OBJC_EXPORT char *objc_str_stream_copy_value(objc_str_stream_t);
OBJC_EXPORT char *objc_str_stream_copy_value_and_free(objc_str_stream_t);
OBJC_EXPORT void objc_str_stream_write(objc_str_stream_t, const char *);
OBJC_EXPORT void objc_str_stream_writec(objc_str_stream_t, char);
OBJC_EXPORT void objc_str_stream_writef(objc_str_stream_t, const char *, ...);
OBJC_EXPORT void objc_str_stream_writefv(objc_str_stream_t, const char *, va_list);

#endif /* SOBJC_COMMONS_STR_STREAM_S */

